import request from '@/util/request.js'

// 登录
export function login(data) {
    return request({
        url: '/login',
        method: 'post',
        data: data,
        params: data,
        headers:{isToken:false}
    })
}

// 登录
export function userType(userId) {
    return request({
        url: '/users/type/'+userId,
        method: 'get',
    })
}

// 获取字典
export function getDict(dictType) {
    return request({
        url: '/system/dict/data/type/' + dictType,
        method: 'get',
    })
}

/**
 * 获取用户信息
 */
export function getUserInfo(code) {
    return request({
        url: '/open/wechat/getUserInfo/' + code,
        method: 'get',
    })
}

/**
 * 获取验证码
 */
export function getCaptchaImage() {
    return request({
        url: '/captchaImage',
        method: 'get',
    })
}
